﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using Eacademy.Library.Helpers;

namespace System.Web.Mvc
{
    //Gravatar HtmlHelpers
    public static class GravatarHtmlHelper
    {
        public static Gravatar Gravatar(this HtmlHelper htmlHelper, string email)
        {
            return new Gravatar() { Email = email, Size = 50, MaxAllowedRating = RatingType.PG };
        }

        public static Gravatar Gravatar(this HtmlHelper htmlHelper, string email, bool outputSiteLink)
        {
            return new Gravatar() { Email = email, Size = 50, MaxAllowedRating = RatingType.PG, OutputGravatarSiteLink = outputSiteLink };
        }

        public static Gravatar Gravatar(this HtmlHelper htmlHelper, string email, short size)
        {
            return new Gravatar() { Email = email, Size = size, MaxAllowedRating = RatingType.PG };
        }

        public static Gravatar Gravatar(this HtmlHelper htmlHelper, string email, short size, bool outputSiteLink)
        {
            return new Gravatar() { Email = email, Size = size, MaxAllowedRating = RatingType.PG, OutputGravatarSiteLink = outputSiteLink };
        }

    }

}